package com.mbc.common.dao;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;

import com.mbc.common.data.UserDataList;
import com.mbc.common.entities.User;
import com.mbc.common.param.CriteriaParams;

public interface UserDAO {
	void create(User entity)throws SQLException;
	void update(User entity)throws SQLException;
	void delete(long key)throws SQLException;
	User find(long key)throws SQLException;
	User findByLoginId(String loginId)throws SQLException;
	UserDataList getList(CriteriaParams cri) throws SQLException;
	ArrayList<User> findAll()throws SQLException;
	void resetPassword(long userId, String newPassword)throws SQLException;
	void updateUserOnlineStatus(long userId, byte status)throws SQLException;
	void updateLatestLoginDateTime(Date latestLoginDateTime, long userId)throws SQLException;
}
